<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<body class="hold-transition skin-blue sidebar-mini">
<div   ng-include src="'common/head.html'"></div>
<div   ng-include src="'common/left.html'"></div>
<div class="wrapper">
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                {{'AGENT_MANAGER' | translate}}
                <small>{{'AGENT_SELECT' | translate}}</small>
            </h1>

        </section>

        <!-- Main content -->
        <section class="content">
            <div class="box box-default">
                <div class="box-header with-border">
                    <h3 class="box-title">{{'SELECT' | translate}}</h3>

                </div>
                <div class="box-body">
                    <div class="row">
                        <div class="col-md-3">
                            <div class="form-group">
                                <label for="cStatus">{{'A01D01_3' | translate}}</label>
                                <select ng-model="lineInfo"
                                        ng-change="changeLine()"
                                        ng-options="line.line_id as line.line_name  for line in lines"
                                        class="form-control select2">

                                </select>
                            </div>
                            <!-- /.form-group -->

                            <!-- /.form-group -->
                        </div>
                    </div>
                    <div class="row">

                        <div class="col-md-3">
                            <div class="form-group">
                                <label for="cType">{{'A01D01_4' | translate}}</label>
                                <select ng-model="versionInfo"
                                        ng-options="version.version_no as version.version_no  for version in versions"
                                        class="form-control select2">

                                    <option value="3">20170711</option>
                                </select>
                            </div>
                            <!-- /.form-group -->

                            <!-- /.form-group -->
                        </div>

                        <div class="col-md-3 col-md-push-3">
                            <label ></label>
                            <div class="form-group">
                                <button type="button" style="margin-top: 5px" ng-click="searchUserInfo()" data-style="expand-left" class="btn btn-block btn-success">{{'SELECT'|translate}}</button>
                            </div>

                        </div>
                    </div>
                </div>
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">{{'SELECT_RESULT' | translate}}</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <table id="example2" class="table table-bordered table-hover word-break">
                        <thead>
                        <tr style="text-align: center">

                            <th style="text-align: center">{{'A01D01_1' | translate}}</th>
                            <th style="text-align: center">{{'A01D01_2' | translate}}</th>
                            <th style="text-align: center">
                                <input type="checkbox" class="minimal" ng-model="select_all" ng-change="selectAll()"/>
                               </th>

                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="device in devices">
                            <td style="text-align: center">{{device.status}}</td>
                            <td style="text-align: center">{{device.equipment_name}}</td>
                            <td style="text-align: center">

                                <input type="checkbox" ng-model="device.checked" ng-model="device.equipment_id" ng-change="selectOne(device.equipment_id)">
                            </td>

                        </tr>

                        </tbody>
                    </table>
                    <div class="row">
                    <div class="col-md-3 col-md-push-9">
                    <div class="form-group" >
                        <button type="button" style="margin-top: 5px" ng-click="saveSettings()" data-style="expand-left" class="btn btn-block btn-info">确定</button>
                    </div>
                    </div>
                    </div>
                </div>

                <!-- /.box-body -->
            </div>

            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
</div>
<!-- ./wrapper -->
<div  ng-include src="'common/foot.html'"></div>
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    {{'A05D01_2'|translate}}
                </h4>
            </div>
            <div class="modal-body">
                <form role="form" id="defaultForm" name="form" ng-submit="updateAgent(form.$valid)">
                    <div class="box-body">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label >{{'A01D02_1' | translate}}</label>
                                    <input type="text" ng-model="cName" class="form-control"ng-required="true"
                                           placeholder="{{'A01D02_23' | translate}}" maxlength="10"
                                           pattern="^[A-Za-z0-9]+$">
                                    <input type="hidden" ng-model="cTaiId" class="form-control" >
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="cAgentName">{{'A01D02_2' | translate}}</label>
                                    <input type="text" ng-model="cAgentName" class="form-control" ng-required="true"
                                           id="cAgentName"
                                           placeholder="{{'A01D02_24' | translate}}" maxlength="45">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="cEmail">{{'A01D02_3' | translate}}</label>
                                    <input type="email" ng-model="cEmail" class="form-control" ng-required="true"
                                           id="cEmail"
                                           placeholder="{{'A01D02_3' | translate}}">
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="cTel">{{'A01D02_15' | translate}}</label>
                                    <input type="text" ng-model="cTel" class="form-control" ng-required="true"
                                           id="cTel"
                                           placeholder="{{'A01D02_15' | translate}}">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>{{'A01D02_13' | translate}}</label>
                                    <select class="form-control select2" ng-model="cType" ng-required="true" id="cType"
                                            style="width: 100%;">
                                        <option value="1" ng-selected="{{cType == 1}}">{{'ALL' | translate}}</option>
                                        <option value="2" ng-selected="{{cType == 2}}">{{'A01D02_10' | translate}}</option>
                                        <option value="3" ng-selected="{{cType == 3}}">{{'A01D02_11' | translate}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label>{{'A01D02_16' | translate}}</label>
                                    <select class="form-control select2" style="width: 100%;" ng-model="cStatus" id="cStatus" ng-required="true">
                                        <option value="1" ng-selected="{{cStatus == 1}}">{{'A01D02_17' | translate}}</option>
                                        <option value="2" ng-selected="{{cStatus == 2}}">{{'A01D02_18' | translate}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="cAddress">{{'A01D02_14' | translate}}</label>
                                    <input type="text" ng-model="cAddress" class="form-control" ng-required="true"
                                           id="cAddress"
                                           placeholder="{{'A01D02_25' | translate}}" maxlength="45">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="cLongitude">{{'A01D02_20' | translate}}</label>
                                    <input type="text" ng-model="cLongitude" class="form-control" ng-required="true"
                                           id="cLongitude"
                                           placeholder="{{'A01D02_20' | translate}}"
                                           >
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="cLatitude">{{'A01D02_21' | translate}}</label>
                                    <input type="text" ng-model="cLatitude" class="form-control" ng-required="true"
                                           id="cLatitude"
                                           placeholder="{{'A01D02_21' | translate}}"
                                           >
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address">{{'A01D02_19' | translate}}</label>
                                    <input type="text" ng-model="address" class="form-control"
                                           id="address"
                                           placeholder="{{'A01D02_14' | translate}}"> <input ng-click="geoAddress()"  type="button" value="{{'SURE' | translate}}">
                                </div>
                            </div>
                        </div>

                        <ng-map zoom="5"  on-click="placeMarker(event)">

                        </ng-map>
                    </div>


            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">{{'A02D02_13'|translate}}
                </button>
                <button type="submit" class="btn btn-primary">
                    {{'A06D01_8'|translate}}
                </button>
            </div>
                </form>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

</body>
</html>
